import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.http.HtmlUtil;

import java.util.Arrays;
import java.util.Date;
import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        String url = "https://rmrb-learning-os-uat.oss-cn-beijing.aliyuncs.com/xxsk/crawler/image/20241014/37422c22501641658f4f0698de6fb576.jpg";
//        String suffix;
//        if (url.contains("?")) {
//            // 处理 http://1.png?v=12 类型
//            suffix = url.substring(url.lastIndexOf(".") + 1, url.lastIndexOf("?"));
//        } else {
//            suffix = url.substring(url.lastIndexOf(".") + 1);
//        }
//        System.out.println(suffix);

//        String domain = "https://rmrb-learning-os-uat.oss-cn-beijing.aliyuncs.com/";
//        System.out.println(url.substring(url.indexOf(domain) + domain.length()));
//        System.out.println(url.substring(url.indexOf("/", 3)));

        String path = URLUtil.getPath(url);
        System.out.println(path.substring(1));

        String[] split = url.split("/",4);
        System.out.println(Arrays.toString(split));
        if (split.length > 3) {
            System.out.println(split[3]);
        }
//
//        boolean a = 10 == 10L;
//        boolean b = 10 == 10.0;
//        System.out.println(Objects.equals("a", "a"));

//        System.out.println(RandomUtil.randomInt(100));
//        System.out.println(System.currentTimeMillis());

//        long between = DateUtil.between(new Date(), DateUtil.endOfDay(new Date()), DateUnit.SECOND);
//        System.out.println(between);
//
//        System.out.println("===========");
//        String str= "<p><mark id=\"editor_postil_mark_106\" plugins=\"postil\" class=\"editor_postil_mark\" style=\"\">一剪梅·红藕香残玉簟秋</mark></p><p><mark id=\"editor_check_mark_61\" plugins=\"postil\" class=\"editor_check_mark\" style=\"\">红藕香残玉簟秋。轻解罗裳，独上兰舟。<span id=\"_baidu_bookmark_start_0\" style=\"display: none; line-height: 0px;\">\u200D</span><mark id=\"editor_postil_mark_119\" plugins=\"postil\" class=\"editor_postil_mark\" style=\"\">云中谁寄锦书来，雁字回时</mark><span id=\"_baidu_bookmark_end_1\" style=\"display: none; line-height: 0px;\">\u200D</span>，月满西楼。花自飘零水自流。一种相思，两处闲愁。此情无计可</mark>消除，才下眉头，却上心头。</p><p>如梦令·昨夜雨疏风骤fffff</p><p>昨夜雨疏风骤，浓睡不消残酒。试问卷帘人，却道海棠依旧。知否，知否？应是绿肥红瘦。</p><section><div class=\"audio-block6212 audioDivs\" style=\"position: relative;width: 342px;height: 52px;border-radius: 4px;opacity: 1;display: flex;flex-direction: row;align-items: center;background: #f2f2f2;border: 0.5px solid #EEEEEE;margin: 0 auto;justify-content: space-between;padding: 0 12px;\"><audio class=\"ueditor_style_audio\"><source src=\"https://pd-resources-sit.pdnews.cn/xxsk/content/video/20241106/2566e96816ba4839892e95c257144936.mp3\"></audio><div class=\"audio-time\" style=\"flex: 1;font-family: Helvetica Neue;font-size: 12px;font-weight: normal;letter-spacing: 0px;color: #999;\"><div class=\"audioStyleTitle\">这是一首歌</div><span class=\"audioCurTime\">00: 00</span> / <span class=\"audioTotalTime\">04: 17</span></div><div class=\"audio-left\" style=\"width: 28px;height: 28px;display: flex;cursor: pointer;\"><img src=\"https://pd-flearnmoment-uat.pdnews.cn/xuexishike/manage/7.png\" class=\"playicon\" style=\"display: initial;\"><img src=\"https://pd-flearnmoment-uat.pdnews.cn/xuexishike/manage/6.png\" class=\"pauseicon\" style=\"display: none;\"></div></div></section><p>这里是新增</p>";
//        String s = HtmlUtil.unwrapHtmlTag(str, "mark", "/mark");
//        System.out.println(s);

        for (Thread.State value : Thread.State.values()) {
            System.out.println(value);
        }
    }
}
